
#include "msg_egs.h"
#include "client_mgr.h"
#include "frontend_service.h"

//#include <server_share/server_def.h>

using namespace NLMISC;
using namespace NLNET;
using namespace FES;
using namespace DEF;
using namespace std;

extern CCallbackServer *Clients;

void cbClientLoadScene ( CMessage& msgin, const string &serviceName, TServiceId serviceId )
{
	UID      uid;
	SCENE_ID scene;
	TServiceId sid;

	msgin.serial(uid);
	msgin.serial(scene);
	msgin.serial(sid);

	CClient* pClient = ClientMgr.findClient(uid);
	if ( pClient != NULL )
	{
		pClient->conZS = sid;
		CMessage msg("SCENE");
		msg.serial(scene);

		Clients->send( msg, pClient->con );
		Clients->authorizeOnly (NULL, pClient->con);
	}
}

void cbClientPlayerIsNull ( CMessage& msgin, const string &serviceName, TServiceId serviceId )
{
	UID      uid;
	msgin.serial(uid);

	CClient* pClient = ClientMgr.findClient(uid);
	if ( pClient != NULL )
	{
		CMessage msg("PLAYER_NULL");
		Clients->send( msg, pClient->con );
		Clients->authorizeOnly (NULL, pClient->con);
	}
}
